import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/admin/zm/loginForZm',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/admin/system/getUser',
    method: 'get',
    params: { token }
  })
}
export function getMenu() {
  return request({
    url: '/admin/system/getMenu',
    method: 'get'
  })
}
export function logout() {
  return request({
    url: '/admin/system/logout',
    method: 'post'
  })
}

export function getRoleMenu() {
  return request({
    url: '/admin/system/getMenu',
    method: 'post',
    data: { type: 'menu' }
  })
}

export function getRoleButton() {
  return request({
    url: '/admin/system/operation',
    method: 'post',
    data: { type: 'button' }
  })
}
export function uploadCos(params) {
  return request({
    url: 'admin/common/getCosSts',
    method: 'get',
    params
  })
}

